package com.suep.business.service.impl;

import com.suep.business.domain.StoreReview;
import com.suep.business.mapper.StoreReviewMapper;
import com.suep.business.service.IStoreReviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StoreReviewServiceImpl implements IStoreReviewService {

    @Autowired
    private StoreReviewMapper storeReviewMapper;

    @Override
    public Integer insertStoreReview(StoreReview storeReview) {
        return storeReviewMapper.insertStoreReview(storeReview);
    }

    @Override
    public StoreReview selectStoreReviewById(Integer reviewId) {
        return storeReviewMapper.selectStoreReviewById(reviewId);
    }

    @Override
    public List<StoreReview> selectStoreReviewByStoreId(Integer storeId) {
        return storeReviewMapper.selectStoreReviewByStoreId(storeId);
    }

    @Override
    public List<StoreReview> selectStoreReviewByUserId(Integer userId) {
        return storeReviewMapper.selectStoreReviewByUserId(userId);
    }

    @Override
    public Integer updateStoreReview(StoreReview storeReview) {
        return storeReviewMapper.updateStoreReviewById(storeReview);
    }

    @Override
    public Integer deleteStoreReviewById(Integer reviewId) {
        return storeReviewMapper.deleteStoreReviewById(reviewId);
    }
}